import axiosInstance from '@/api/axiosInstance'
interface bonusSettingListParams {
  stat_month?: string
  doctor_name?: string
  docotor_code?: string
  // 其他查询条件...
}

// 获取奖金设置列表
export const getBonusSettingList = async (params?: bonusSettingListParams) => {
  return axiosInstance.get('/admin/bonus-setting', { params })
}

// 获取奖金设置详情
export const getBonusSettingDetail = async (id: number) => {
  return axiosInstance.get(`/admin/bonus-setting/${id}`)
}
// 创建奖金设置
export const createBonusSetting = async (data: any) => {
  return axiosInstance.post('/admin/bonus-setting', data)
}

// 更新奖金设置
export const updateBonusSetting = async (id: number, data: any) => {
  return axiosInstance.put(`/admin/bonus-setting/${id}`, data)
}

// 删除奖金设置
export const deleteBonusSetting = async (id: number) => {
  return axiosInstance.delete(`/admin/bonus-setting/${id}`)
}

//创建奖金等级
export const createBonusLevel = async (id: number, data: any) => {
  return axiosInstance.post(`/admin/bonus-setting/${id}/bonus-level`, data)
}

//更新奖金等级
export const updateBonusLevel = async (id: number, levelId: number, data: any) => {
  return axiosInstance.put(`/admin/bonus-setting/${id}/bonus-level/${levelId}`, data)
}

//删除奖金等级
export const deleteBonusLevel = async (id: number, levelId: number) => {
  return axiosInstance.delete(`/admin/bonus-setting/${id}/bonus-level/${levelId}`)
}
